<?php

/**
 * Content form.
 *
 * @package    www.furr.sk
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ContentForm extends BaseContentForm
{
  public function configure()
  {
      $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'category_id' => new  sfWidgetFormInputHidden(),
      //'created_at'  => new sfWidgetFormDateTime(),
      //'updated_at'  => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
      'category_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Category'), 'required' => false)),
      //'created_at'  => new sfValidatorDateTime(),
      //'updated_at'  => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('content[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  }
}
